@(tasks: List[Task], taskForm: Form[Task])

@import helper._

@main("Todo list") {

    <h1> @tasks.size() task(s) </h1>
    <ul>
        @for(task <- tasks ) {
            <li>
                @task.label
                
                @form(routes.Application.deleteTask(task.id)){
                    <input type="submit" value="Delete">    
                }    

            </li>
        }
    </ul>

    <h2> add a new task</h2>
    @form(routes.Application.newTask()){
    
        @inputText(taskForm("label"))
        <input type="submit" value="Create">
    }
}
